using System;
using System.Collections.Generic;
using System.ComponentModel;
using Microsoft.Ccr.Core;
using Microsoft.Dss.Core.Attributes;
using Microsoft.Dss.ServiceModel.Dssp;
using Microsoft.Dss.ServiceModel.DsspServiceBase;
using W3C.Soap;

namespace UrbanCam
{
	public sealed class Contract
	{
		[DataMember]
		public const string Identifier = "http://schemas.tempuri.org/2008/09/urbancam.html";
	}
	
	[DataContract]
	public class UrbanCamState
	{
        [DataMember]
        public string CamUriName = "";

	}

    
    [DataContract]
    public class NotifySignalState
    {
        [DataMember]
        public uint RCount = 0;

        [DataMember]
        public uint GCount = 0;

        [DataMember]
        public uint LeftCount = 0;

        [DataMember]
        public uint RightCount = 0;

    }

    [DataContract]
    public class SetUpdateState
    {
        [DataMember]
        public bool bUpdate = false;

    }

    
	
	[ServicePort]
    public class UrbanCamOperations : PortSet<DsspDefaultLookup, DsspDefaultDrop, Get, Connect, NotifySignal, Subscribe, SetUpdate> 
	{
	}
	
	public class Get : Get<GetRequestType, PortSet<UrbanCamState, Fault>>
	{
		public Get()
		{
		}
		
		public Get(GetRequestType body)
			: base(body)
		{
		}
		
		public Get(GetRequestType body, PortSet<UrbanCamState, Fault> responsePort)
			: base(body, responsePort)
		{
		}
	}


    public class SetUpdate : Update<SetUpdateState, PortSet<DefaultUpdateResponseType, Fault>>
    {
        public SetUpdate()
        {
        }

        public SetUpdate(SetUpdateState body)
            : base(body)
        {
        }
    }

    public class Connect : Update<UrbanCamState, PortSet<DefaultUpdateResponseType, Fault>>
    {
        public Connect()
        {
        }

        public Connect(UrbanCamState body)
            : base(body)
        {
        }
    }



    public class NotifySignal : Replace<NotifySignalState, PortSet<DefaultReplaceResponseType, Fault>>
    {
        public NotifySignal()
        {
        }

        public NotifySignal(NotifySignalState body)
            :
            base(body)
        {
        }
    }

    /// <summary>
    /// AI subscribe operation
    /// </summary>
    public class Subscribe : Subscribe<SubscribeRequestType, PortSet<SubscribeResponseType, Fault>>
    {
        /// <summary>
        /// Creates a new instance of Subscribe
        /// </summary>
        public Subscribe()
        {
        }

        /// <summary>
        /// Creates a new instance of Subscribe
        /// </summary>
        /// <param name="body">the request message body</param>
        public Subscribe(SubscribeRequestType body)
            : base(body)
        {
        }

        /// <summary>
        /// Creates a new instance of Subscribe
        /// </summary>
        /// <param name="body">the request message body</param>
        /// <param name="responsePort">the response port for the request</param>
        public Subscribe(SubscribeRequestType body, PortSet<SubscribeResponseType, Fault> responsePort)
            : base(body, responsePort)
        {
        }
    }
}


